package com.haiyangwang1.lesson12.pointer;

public class P1 {
    int x;
    int y;
    public double getDistance(P1 p){
        double d = Math.sqrt(((this.x-p.x)*(this.x- p.x))+((this.y-p.y)*(this.y- p.y)));
        return d;
    }
}
